package com.fingard.dsp.bank.directbank.aibank01.utils;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;

import com.baidu.ub.msoa.container.BundleContextLoader;
import com.baidu.ub.msoa.container.support.bundle.ExtBundleContextPostProcessor;

public class ServiceInjection extends ExtBundleContextPostProcessor implements BeanDefinitionRegistryPostProcessor{

	public ServiceInjection(String bundleName) {
		super(bundleName);
	}
	
	public void setReloadBundleContext(boolean reloadBundleContext) {
		
     super.setReloadBundleContext(true);
     
   }
	
	public void afterPropertiesSet() throws Exception
       {
	       BundleContextLoader.load();
	   }
	
	@Override
	public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
		
	}

	public void setBundleServiceResolver(BundleContextLoader bundleContextLoader) throws Exception {
		super.afterPropertiesSet();
	}


	@Override
	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {

	}
}
